using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XFGameFramework;
using XFGameFramework.BuffSystem;

public class hungry : BuffBase
{
    public int AgilityIncrease = -2;
    public int StrengthIncrease = -2;
    private PlayerModel playerModel => Owner as PlayerModel;
    public override void OnAdd()
    {
        base.OnAdd();

        if(playerModel== null)
        {
            throw new System.Exception("Owner is not a PlayerModel");

        }

        playerModel.Agility += AgilityIncrease;
        playerModel.strength += StrengthIncrease;

    }
    public override void OnRemove()
    {
        if(playerModel== null)
        {
            throw new System.Exception("Owner is not a PlayerModel");

        }
        playerModel.Agility -= AgilityIncrease;
        playerModel.strength -= StrengthIncrease;

        
        base.OnRemove();
        
    }
    
}
